﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using WmsApp.Service;

namespace WmsApp.WmsService
{
    public partial class OutStoreBillWrap
    {
        public bool IsNeedSaved()
        {
            if ( this.POutStoreBill != null)
            {
                if (this.POutStoreBill.WcfEntityState == EntityState.Added || this.POutStoreBill.WcfEntityState == EntityState.Modified)
                {
                    return true;
                }
                if(this.POutStoreBillDtl != null && this.POutStoreBillDtl.Count>0)
                {
                    return this.POutStoreBillDtl.Any(dtl => dtl.WcfEntityState == EntityState.Added || dtl.WcfEntityState == EntityState.Modified);
                }
            }
            return false;
        }
    }
}
